package com.ap.core.bulkupload.service;

import com.ap.core.bulkupload.types.BulkFileUploadEnum;
import com.ap.core.bulkupload.validation.info.ValidationResult;
import com.ap.core.exception.APCoreException;

/**
 * User: Gibu.Paul This business validation service will be used by AP Core to
 * validate incoming messages from OSB.
 */
public interface BusinessRuleValidationService<V> {

	/**
	 * Validates the object using specific set of business rules based on the
	 * validation type.
	 * 
	 * @param object
	 *            the info object on which the rule is applied.
	 * @param bulkUploadTypes
	 *            the bulk upload types
	 * @return List of error codes against failures
	 * @throws APCoreException
	 *             the aP core exception
	 */
	ValidationResult validate(V object, BulkFileUploadEnum bulkUploadTypes)
			throws APCoreException;

}